<?php
include_once 'basepath.php';
/*data arrive
 * $fk_idtours 
 */
//print_r($edit);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link rel="stylesheet" href="<?php echo $bpath;?>/css/reset.css" />
<link rel="stylesheet" href="<?php echo $bpath;?>/css/text.css" />
<link rel="stylesheet" href="<?php echo $bpath;?>/css/960_24_col.css" />
 <link rel="stylesheet" href="<?php echo $bpath;?>/css/jquery-ui-1.8.21.custom.css" />
 <link rel="stylesheet" href="<?php echo $bpath;?>/css/style.css" />
 <link rel="stylesheet" href="<?php echo $bpath;?>/css/faary.css" type="text/css" />
 <script type="text/javascript" src="<?php echo $bpath;?>/js/jquery-1.7.2.min.js"></script>
 <script type="text/javascript" src="<?php echo $bpath;?>/js/jquery-ui-1.8.21.custom.min.js"></script>
<script type="text/javascript" src="<?php echo $bpath;?>/js/scripts.js"></script>
<script type="text/javascript" src="<?php echo $bpath;?>/js/jquery.validate.js"></script>
</head>

<body>
	<script type="text/javascript">
	$(function(){
$(".formbus").validate({
		submitHandler: function(form){ form.submit() },
		 onfocusout: false,

		rules: {
			
			codebus: {
				required: true,
				minlength: 5
			},
		
			
			seatquantity: {
     		 required: true,
     		 number: true,
     		  maxlength: 3
     		 
   			},
   			
   			BusCompany: {
     		 required: true,
   			},
   			HotelInfo: {
     		 required: true,
   			}
			
		},
		
		messages: {
			TourName: "Enter Code Bus (at least 5 caracter)",
			seatquantity: "enter max 3 number",
			Date:"Enter Bus Company",
			Description:"Enter Hotel Information"
			}
		
});})
</script>
	<div class="principal container_24">
		
		<!--logo-->
		<div class="logo grid_24">
			<div class="grid_1">&nbsp;</div>
			<div class="grid_4 logoimage"><img src="<?php echo $bpath;?>/img/logo.png" height="90"></div>
			<div class="logout grid_5"><a href="index.php?loginprocess/loginout"><img src="<?php echo $bpath;?>/img/bt_logout.jpg"/></a></div>
		</div><!-- end logo-->
		
		<!--menupricipal-->
		<div class="menuprincipal grid_24">
			<a class="yearlist " href="index.php?liste/listtour">Back to List </a>
		</div>
		<!-- end menupricipal-->
				
			<div class="descprincipal grid_22">
				description
			</div>
			
			<div class="grid_24 listcontent">
				<h1>BUS CONFIGURATION</h1>
				<div class="grid_22 list">
<?php if(isset($edit)!=true) {?>				
<form method="post" action="index.php?add/actionAdd/bus" onsubmit="return false" class="iform grid_18 formbus"  onSubmit="return false">
<input type="hidden" name="fk_idtours" value="<?php echo $fk_idtours; ?>">
<?php }else{?>
<form method="post" action="index.php?edit/actionedit/bus" onsubmit="return false" class="iform grid_18 formbus"  onSubmit="return false">
<input type="hidden" name="idbus" value="<?php echo $edit[0]["idbus"];?>">
<input type="hidden" name="idtour" value="<?php echo $edit[0]["fk_idtours"];?>">
<?php }?>
<div id="imessageOK">Thank you! Message Sent!</div>
<div id="imessageERROR">ERROR: Message Not Sent!</div>
<ul class="">
<li class="iheader">BUS CONFIGURATION</li>
<li><label for="CodeBus">*code</label><input class="itext" type="text" name="codebus" id="codebus"  value="<?php  echo (isset($edit))? $edit[0]["code"]:"";?>"/></li>
<li><label for="seatquantity">*Seat Quantity</label><input class="itext" type="text" name="seatquantity" id="seatquantity"  value="<?php  echo (isset($edit))?$edit[0]["seatqty"]:"";?>" /></li>
<li><label for="Guider">Guide</label><input class="itext" type="text" name="Guider" id="Guider"   value="<?php  echo (isset($edit))?  $edit[0]["guider"]:"";?>"/></li>
<li><label for="Driver">Driver</label><input class="itext" type="text" name="Driver" id="Driver"  value="<?php echo (isset($edit))?$edit[0]["driver"]:"";?>"/></li>
<li><label for="Bus_Company">*Bus Company</label><input class="itext" type="text" name="BusCompany" id="BusCompany"  value="<?php echo(isset($edit))? $edit[0]["bus_company"]:"";?>" /></li>
<li><label for="hotelinfo">*Hotel Infomation</label><textarea class="itextarea" name="HotelInfo" id="HotelInfo"> <?php echo (isset($edit))?$edit[0]["hotel_info"]:"";?></textarea></li>
<li><label>&nbsp;</label><input type="submit" class="ibutton"  name="SendaMessage" id="SendaMessage" value="Submit" /></li>
</ul></form>
				</div>
			</div>
		
	</div><!--end principal-->
</body>
</html>